<? if ($c = stack('name')) {

//	$d = component_data($c); 
	$s = component_settings($c);

	ob_start();

	if (sizeof($DIAGS)) {
		?><script type="text/javascript">jQuery(function($) {	$(".diags").fadeTo(10000, 0).slideUp(500) });</script><?
		?><div class="diags"><p><?=implode("</p><p>", $DIAGS)?></p></div><?
	}
	
	?><form action="" method="post">

		<table>
			<tr><td class="b-field-name"><label for="form_name"><?=$s['form_name']?></label></td>
			   <td class="b-field-value"><input type="text" name="form_name" id="form_name" class="form-input" value="<?=h($_POST["form_name"])?>" /></td>
			</tr>

			<tr><td class="b-field-name"><label for="form_friend_name"><?=$s['form_friend_name']?></label></td>
			   <td class="b-field-value"><input type="text" name="form_friend_name" id="form_friend_name" class="form-input" value="<?=h($_POST["form_friend_name"])?>" /></td>
			</tr>

			<tr><td class="b-field-name"><label for="form_friend_mail"><?=$s['form_friend_mail']?></label></td>
			   <td class="b-field-value"><input type="text" name="form_friend_mail" id="form_friend_mail" class="form-input" value="<?=h($_POST["form_friend_mail"])?>" /></td>
			</tr>

			<tr><td class="b-field-name"><label for="form_note"><?=$s['form_note']?></label></td>
			   <td class="b-field-value"><textarea name="form_note" id="form_note" class="form-input"><?=$_POST["form_note"]?></textarea></td>
			</tr>

		</table>

		<input type="hidden" name="check" value="<?=$s['check']?>" />
		<p><input type="submit" name="send_form" value="<?=$s['form_send']?>" /></p>
		</form>
	<?
	
	$form = ob_get_clean();
	
	$html = (strpos($s['caption'], '{form}') !== false) ? str_replace('{form}', $form, $s['caption']) : $s['caption'].$form;
		
	?><?=$html?><?
		
	unstack();
} ?>